<?php

namespace App\Service;

use App\Repositories\SchoolRepository;;


class SchoolService extends BaseService {
    protected $schoolRepository;

    public function __construct(
        SchoolRepository $schoolRepository
    ){
        $this->schoolRepository = $schoolRepository;
    }

    /**
     * 校区列表
     * @return array
     */
    public function list(){
        $schoolObject = $this->schoolRepository->list();
        return !empty($schoolObject) ? $schoolObject->toArray() : [];
    }
}
